/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.skycode.cnx;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 * @author SkyCode (skycode@gmail.com)
 * @since 13/01/2014
 * @version 1.0
 */
public class Conexion {
    
    /**
     * cnx: almacena la conexion para alguna base de datos
     * @since 13/01/2014
     */
    private static Connection cnx;
    
    /**
     * getConexionOracle: retorna el objeto Connection para la bd Oracle
     * @since 13/01/2014
     * @return objeto Connection
     */
    public static Connection getConexionOracle() {
        try {
            Class.forName("oracle.jdbc.OracleDriver");
            String bd = "jdbc:oracle:thin:@localhost:1521:XE";
            cnx = DriverManager.getConnection(bd, "SKYCODE", "SKYCODE");            
        } catch (Exception e) {
            e.printStackTrace();
        }
        return cnx;
    }
}
